package com.asset.util;

import lombok.Data;

import java.util.List;

/**
 * 分页结果封装类
 * @author 11725
 */
@Data
public class PageResult<T> {
    /** 记录总条数 */
    private Long total;
    /** 记录总页数 */
    private Long totalPage;
    /** 数据集合 */
    private List<T> data;

    public PageResult() {}

    public PageResult(Long total, List<T> data) {
        this.total = total;
        this.data = data;
    }

    public PageResult(Long total, Long totalPage, List<T> data) {
        this.total = total;
        this.totalPage = totalPage;
        this.data = data;
    }
}
